Skip to content

TS: Don't extract "redirecting" SourceFiles#1247

Merged
semmle-qlci merged 1 commit into
github:masterfrom
asger-semmle:tscrash
Apr 16, 2019
Merged

TS: Don't extract "redirecting" SourceFiles#1247
semmle-qlci merged 1 commit into
github:masterfrom
asger-semmle:tscrash

Conversation

@asger-semmle

Copy link
Copy Markdown
Contributor

Fix for ODASA-7908.

Under rare circumstances the AST we get from the TypeScript API is a "redirecting" SourceFile, which can't be extracted like other SourceFiles.

I tried finding out under what circumstances this happens, but based on an this assertion in the TypeScript compiler it seems to be unintended behavior. So I've just worked around it the best we can.

I've confirmed that it works for the original project, but I haven't been able to reproduce it anywhere else. So unfortunately no regression test and no TypeScript bug report as I have no idea how it reproduce it in a small test case.

@asger-semmle asger-semmle requested a review from a team as a code owner April 15, 2019 18:12

@xiemaisi xiemaisi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

¯_(ツ)_/¯

@semmle-qlci semmle-qlci merged commit aeebc36 into github:master Apr 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants